<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

function format_currency($number) {
    $text = $number;
    if ($number >= 1000)
        $text = number_format($number / 1000, 3, ".", ".");

    if ($number < 0 && abs($number) >= 1000)
        $text = number_format($number / 1000, 3, ".", ".");
    return $text;
}

